<template>
  <div id="app">
    <!-- <Layout
            v-if="token"
            @hasToken="hasToken"
        />
        <Login
            v-else
            @hasToken="hasToken"
    />-->
    <router-view></router-view>
  </div>
</template>
<script>
import Layout from "./views/layout/Layout";
import Login from "./views/login";

export default {
  components: { Layout, Login },
  name: "App",
  computed: {},
  data() {
    return {
      token: localStorage.getItem("loginToken")
    };
  },
  mounted() {
    console.log(window, "打印的");
    this.token = localStorage.getItem("loginToken");
  },
  methods: {
    hasToken(val) {
      this.$nextTick(() => {
        this.token = val;
      });
    }
  }
};
</script>
<style lang="scss">
#app {
  width: 100%;
  height: 100%;
}
.el-main {
  padding: 0;
}
.el-dialog {
  min-height: 674px;
}
.el-menu,
.el-submenu__title:hover,
.el-menu-item:hover {
  background: transparent !important;
}
.el-aside {
  background: linear-gradient(
    90deg,
    rgba(241, 243, 247, 1) 0%,
    rgba(233, 234, 235, 1) 83%,
    rgba(229, 230, 231, 1) 100%
  ) !important;
}
.el-tree-node__expand-icon {
  font-weight: bolder;
}
.iconfont {
  color: #0090ff;
}
.el-button {
  height: 40px;
  min-width: 88px;
}
.el-button.el-button--default {
  color: #0090ff;
  border: 1px solid #0090ff;
}
.el-button.el-button--default:hover {
  background: #ebf6ff;
}
.el-button.el-button--default:active {
  background: #b7dfff;
}
.el-button.el-button--default.is-disabled,
.el-button.el-button--default.is-disabled:hover {
  background: rgba(237, 241, 245, 1);
  border: 1px solid rgba(197, 202, 214, 1);
  color: #c5cad6;
}
.el-button.el-button--primary {
  color: #fff;
  background: rgba(0, 142, 255, 1);
  border: 1px solid #0090ff;
}
.el-button.el-button--hover {
  color: #fff;
  background: rgba(73, 175, 255, 1);
  border: 1px solid rgba(73, 175, 255, 1);
}
.el-button.el-button--active {
  color: #fff;
  background: rgba(0, 123, 219, 1);
  border: 1px solid rgba(0, 123, 219, 1);
}
.el-button.el-button--primary.is-disabled,
.el-button--primary.is-disabled:hover {
  color: #fff;
  background: rgba(197, 202, 214, 1);
  border: 1px solid rgba(197, 202, 214, 1);
}
.el-button.el-button--small {
  min-width: 60px;
  padding: 0;
  height: 35px;
}
.el-button.el-button--small.el-button--primary:hover {
  color: #fff;
  background: rgba(73, 175, 255, 1);
  border: 1px solid rgba(73, 175, 255, 1);
}
.btn-style {
  color: #0090ff;
}
.el-table td,
.el-table th {
  padding: 5px 0;
}
.el-input__inner,
.el-textarea__inner {
  border-radius: 0;
}

.el-tabs__content {
  font-size: 14px;
}
.el-table {
  tr {
    height: 53px;
    background: #fff;
  }
}
.icon-sousuo {
  float: right;
  line-height: 38px;
}
.el-table tr:nth-child(2n + 1) {
  background: #fff !important;
}
.el-button.el-button--small,
.el-button.el-button--small:hover {
  height: 35px !important;
}
.el-table--enable-row-hover .el-table__body tr:hover > td {
  background-color: #fafafa;
}
.line-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 10px;
}
</style>
